package com.come4loves.game.module.fight.action;

import com.come4loves.game.module.battle.helper.PBConvertHelper;
import com.come4loves.game.module.fight.constants.EndType;
import com.come4loves.game.proto.BattleProto;
import com.google.protobuf.GeneratedMessage.Builder;

public class EndAction extends Action {

	private EndType endType;
	public EndAction(EndType endType) {
		super(0);
		this.endType = endType;
	}

	public EndType getEndType() {
		return endType;
	}
	@Override
	public Builder<?> toProtocolBufferBuilder() {
		BattleProto.EndAction.Builder builder = BattleProto.EndAction.newBuilder();
		builder.setResult(PBConvertHelper.convertEndType(this.endType));
		return builder;
	}

}
